package com.main.by.service.impl;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.main.by.dao.SubmitAndTaskDao;
import com.main.by.entity.vo.AdminLoginVO;
import com.main.by.entity.vo.SubmitAndTaskVO;
import com.main.by.service.SubmitAndTaskService;
@Service
public class SubmitAndTaskServiceImpl implements SubmitAndTaskService {
	
	private static Logger logger = Logger.getLogger(SubmitAndTaskServiceImpl.class);
	
	@Autowired
	private SubmitAndTaskDao submitAndTaskDao;


	@Override
	public List<SubmitAndTaskVO> findAll(HttpServletRequest request) throws Exception {
		logger.info("查询数据库");
		return  submitAndTaskDao.findAll();
	}


	@Override
	public boolean auditSubmitInfo(int submitId) throws Exception {
		logger.info("查询数据库");
		return  submitAndTaskDao.auditSubmitInfo(submitId);
	}
	
	@Override
	public boolean deleteSubmitById(int submitId) throws Exception {
		logger.info("查询提交任务数据库");
		return  submitAndTaskDao.deleteSubmitById(submitId);
	}
	
	@Override
	public List<SubmitAndTaskVO> findAllAudited(HttpServletRequest request) throws Exception {
		logger.info("查询数据库");
		return  submitAndTaskDao.findAllAudited();
	}
	
	@Override
	public SubmitAndTaskVO findSubmitAndTaskInfoById(int submitId) throws Exception {
		logger.info("查询管理员数据库");
		return  submitAndTaskDao.findSubmitAndTaskInfoById(submitId);
	}

}
